from django.contrib import admin
from room_booking.Booking.models import *
from django.contrib import databrowse
from Booking.models import *

class RegisterAdmin(admin.ModelAdmin):
	list_display = ('Person_ID', 'Password', 'Name' , 'SirName', 'Birth_date', 'Department', 'Email')
	search_fields = ('Person_ID', 'Name')
	ordering = ('Person_ID',)

class AdminLoginAdmin(admin.ModelAdmin):
	list_display = ('Admin_ID', 'Admin_Pass', 'Admin_Name' , 'Admin_SirName', 'Admin_BirthDate', 'Admin_Department', 'Admin_Email')
	search_fields = ('Admin_ID', 'Admin_Name')
	ordering = ('Admin_ID',)

class Computer_FixAdmin(admin.ModelAdmin):
	list_display = ('Computer_ID', 'Status_Com', 'Date_Error')
	search_fields = ('Computer_ID', 'Date_Error')
	ordering = ('Computer_ID',)

class ComError_HistoryAdmin(admin.ModelAdmin):
	list_display = ('Error_ID', 'Lose', 'Date_Lose')
	ordering = ('Error_ID', 'Date_Lose',)



admin.site.register(Register, RegisterAdmin)
admin.site.register(AdminLogin, AdminLoginAdmin)
admin.site.register(Computer_Fix, Computer_FixAdmin)
admin.site.register(ComError_History, ComError_HistoryAdmin)

admin.site.register(Timing)
admin.site.register(Booking)
admin.site.register(Computer)
admin.site.register(User_Profile)
admin.site.register(Booking_history)

databrowse.site.register(Register)
databrowse.site.register(AdminLogin)
databrowse.site.register(Computer_Fix)
databrowse.site.register(ComError_History)

databrowse.site.register(Timing)
databrowse.site.register(Booking)
databrowse.site.register(Computer)
databrowse.site.register(User_Profile)
databrowse.site.register(Booking_history)

